import { ApiProperty } from '@nestjs/swagger';
import { IsArray, IsBoolean, IsEmail, IsNotEmpty, IsNumber, IsPhoneNumber, IsString } from 'class-validator';
import { ShareDto } from './share.dto';

export class MenuDto extends ShareDto {
  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '菜单标题',
    example: 'title'
  })
  title: string;

  // validator
  @IsString()
  //swagger
  @ApiProperty({
    description: '菜单地址',
    example: 'menuPath'
  })
  menuPath: string;

  // validator
  @IsString()
  //swagger
  @ApiProperty({
    description: '菜单图标',
    example: 'nenu'
  })
  icon: string;

  // validator
  @IsString()
  //swagger
  @ApiProperty({
    description: '父级菜单',
    example: 'nenu'
  })
  parentId: string;
}